/*
 * msg.c: stdout/stderr messages
 *
 * Copyright (C) 1999 by Ruda Moura
 */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

void version()
{
	char *s = "Xvidmode 0.3.19990505\n";

	printf("%s", s);
	exit(0);
}

void usage()
{
	char *s = "\
Usage: Xvidmode [OPTIONS]\n\
Get/set X video modes.\n\n\
\tXvidmode\t\t\tget current video mode\n\
\tXvidmode -h, --help\t\tdisplay this help\n\
\tXvidmode -n, --next \t\tgo to the next mode\n\
\tXvidmode -p, --previous\t\tgo to the previous mode\n\
\tXvidmode -l, --listall\t\tget all video modes available\n\
\tXvidmode -v, --version\t\toutput version information\n\
\tXvidmode <hres> <yres>\t\tswitch to video mode <hres> <yres>\n\n\
Report bugs to Ruda Moura <ruda@helllabs.org>\n";

	printf("%s", s);
	exit(0);
}

void perr(char *msg)
{
	fprintf(stderr, "Xvidmode: %s\n", msg);
	exit(1);
}
